<?php
/**
 * HTTP Response Exception
 * Exceptions derived from this class are used to respond using HTTP's
 * pre-defined HTTP response codes such as "404 Not Found".
 *
 * To retrieve the response code, use the built-in getCode() method and to get
 * the response message, use the built-in getMessage() method.
 *
 * @package     Visi
 * @subpackage  Exceptions
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id$
 */
class Visi_Controller_Response_Exception extends Visi_Exception {

    public function __construct($message = null, $code = 0) {
    
        /**
         * Because some exceptions that extend this class allow parameters
         * beyond message and code, I have to manually re-assign these params
         * so they don't get reset when the user passes in null values for them
         */
        if (!$message) {
            $message = $this->message;
        }
        if (!$code) {
            $code = $this->code;
        }
        return parent::__construct($message, $code);
    
    }

}